package com.spring.core.factory;

import com.spring.core.context.AnnotationApplicationContext;


/**
 * Spring 上下文工厂
 *
 * @author Zee
 * @version 1.0
 * @date 2021/10/13
 */
public class AnnotationContextFactory {
    private static AnnotationApplicationContext context;

    public static AnnotationApplicationContext getInstance(Class<?> clazz) {
        if (null == context) {
            context = new AnnotationApplicationContext(clazz);
        }
        return context;
    }
}
